<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
<h3>hello <span th:text="${session.currUser.usrName}"/>  |
    角色 : <span th:text="${session.currUser.role.roleName}"/>

    |  权限数量<span th:text="${session.currUser.role.rights.size()}"/>

    <a th:href="@{logout}">[注销]</a> </h3>

<!--
<ul>
    <li><a th:href="@{user/list}"  shiro:hasRole="管理员">查全部</a></li>
    <li><a th:href="@{user/add}" shiro:hasPermission="user:add">新增用户</a></li>
    <li><a th:href="@{user/update}">修改用户信息</a></li>
    <li><a th:href="@{user/view/321}" shiro:hasPermission="L0501">按id查看单个&#45;&#45;[非管理员有]</a></li>
</ul>-->

<!--遍历集合-->
<ul>
    <li th:if="${right1.rightType=='Folder'}" th:each="right1: ${session.currUser.role.rights}">
        <a href="" th:text="${right1.rightCode}"></a>
        <ul>
            <li th:each="right2: ${session.currUser.role.rights}"
                th:if="${right2.rightType=='Document' && right2.rightParentCode == right1.rightCode}"
            >
                &nbsp;&nbsp;&nbsp;&nbsp;<a th:href="${right2.rightUrl}"  th:text="${right2.rightCode}"></a></li>
        </ul>
    </li>
</ul>
</body>
</html>